﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BSCMFF.Core.DataAccessLayer;

namespace BSCMFF.Web.UserControls.Evaluation
{
    public partial class EvaluatePKPIDetail : System.Web.UI.UserControl
    {
        private Evaluation_PKPIs _epkpi;

        public Evaluation_PKPIs EPKPI
        {
            get
            {
                if (_epkpi == null)
                {
                    _epkpi = new Evaluation_PKPIs();
                    //int tempID = 0;
                    //Int32.TryParse(HiddenFieldID.Value, out tempID);
                    //_pkpi.ID = tempID;
                    //_pkpi.Name = RadTextBoxName.Text;
                    //_pkpi.Description = RadTextBoxDescription.Text;

                    return _epkpi;
                }
                else
                {
                    return _epkpi;
                }

            }
            set
            {
                _epkpi = value;
            }
        }

        public int EPKPI_ID
        {
            get
            {
                return Int32.Parse(HiddenEPKPI_ID.Value);
            }
        }

        //public String Name
        //{
        //    get
        //    {
        //        return RadTextBoxName.Text;
        //    }
        //}

        //public String Description
        //{
        //    get
        //    {
        //        return RadTextBoxDescription.Text;
        //    }
        //}

        //public String Measure
        //{
        //    get
        //    {
        //        return RadTextBoxMeasure.Text;
        //    }
        //}

        public String VerbalEvaluation
        {
            get
            {
                return RadTextBoxCurrentVerbalEvaluation.Text;
            }
        }

        //public int Weight
        //{
        //    get
        //    {
        //        return (int)RadNumericTextBoxWeight.Value;
        //    }
        //}

        //public int? StartValue
        //{
        //    get
        //    {
        //        return (int?)RadNumericTextBoxStartValue.Value;
        //    }
        //}

        //public int? TargetValue
        //{
        //    get
        //    {
        //        return (int?)RadNumericTextBoxTargetValue.Value;
        //    }
        //}

        public int Score
        {
            get
            {
                return (int)RadNumericTextBoxScore.Value;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        internal void DisableTextBoxes()
        {
            RadTextBoxCurrentVerbalEvaluation.Enabled = false;
            RadNumericTextBoxScore.Enabled = false;
        }
    }
}